unit URotinaAux;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, URotinasBase, ComCtrls, StdCtrls, Buttons, ExtCtrls, DB,
  DBTables;

type
  TFRotinaAux = class(TFRotinasBase)
    Button1: TButton;
    Table1: TTable;
    procedure Button1Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FRotinaAux: TFRotinaAux;

implementation

{$R *.dfm}
uses UDmGestao, UGeral,  UCobranca,
  VendaCancelaNotaFiscal, UEmissaoNotaFiscal,
  UPesquisaItemNotaFiscal, UGestao, UPesquisaRapida, UEmissaoCobrancaVendas,
  PedidoVenda_NOVO, UValoresEstoqueProduto, UPesquisaNovaNFVenda,
  UConsultaNFNaoEmitida, UPesquisaPedidoNotaFiscal, UConsultaItensNfMae;

procedure TFRotinaAux.Button1Click(Sender: TObject);
begin
  inherited;

  Table1.First;

  while NOT (Table1.Eof) do
  begin
   if Table1.FieldByName('CLI_INSCESTADUAL').AsString <> 'ISENTO' then
   begin
    Table1.Edit;
    Table1.FieldByName('CLI_INSCESTADUAL').AsString:=RemoveMascara(Table1.FieldByName('CLI_INSCESTADUAL').AsString);
    Table1.Post;
   end;

   Table1.Next;
  end;


end;

procedure TFRotinaAux.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  inherited;
  FRotinaAux:=nil;
end;

end.
